<template>
	<view>
		<uni-search-bar radius="100" v-model="searchValue" :focus="false" bg bgColor="#fff" cancelButton="none"
			clearButton="auto" @focus="toSearch">
		</uni-search-bar>
		<ShopList :searchValue="searchValue"></ShopList>
	</view>
</template>

<script>
	import ShopList from '@/components/common/ShopList.vue';
	export default {
		data() {
			return {
				searchValue: ''
			};
		},
		components: {
			ShopList
		},
		methods: {
			toSearch() {
				uni.navigateTo({
					url: '/pages/search/search',
				});
			}
		},
		onLoad(e) {
			this.searchValue = e.searchValue;
			// #ifdef APP-PLUS
			var webView = this.$mp.page.$getAppWebview();
			// 设置 searchInput的 text  
			webView.setTitleNViewSearchInputText(e.searchValue);
			// #endif
		},
		onBackPress() {
			// #ifdef APP-PLUS
			plus.key.hideSoftKeybord();
			// #endif
		}
	}
</script>

<style lang="scss">

</style>
